package cn.hd01.service;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import cn.hd01.repository.entity.ConsumeReport;
import cn.hd01.repository.entity.Customer;
import cn.hd01.repository.entity.MyCustomer;
import cn.hd01.repository.entity.StarReport;

public interface CustomerService extends BaseService<Customer, Integer> {
	List<Object[]> findAllCustomer();
	
    Page<Customer> findAll(Customer customer, Pageable pageable);
    
    int updateCustomer(Customer customer);
    
    int updateCustomerStatus(Integer id, String status);
    
    int updateCustomerAuditStatus(Integer id, String status);
    
    Customer findByPhoneNo(String phoneNo);
    
    Customer findByOauthId(Integer oauthId);
    
    int updateCustomerServant(Integer servantId, String type);
    
    int updateCustomerDistributor(Integer distributorId);
    
	Page<Customer> findRecommendCustomer(Integer recommendDistributorId, Pageable pageable);

	Page<MyCustomer> findMyCustomer(Integer recommendDistributorId, Pageable pageable);
	
	int updateCustomerLevel(Integer levelId);
	
	List<Integer> findDistributorIdByServantId(Integer servantId);
	
	int countByTypeAndAuditStatus(String type, String auditStatus);
	
	int countByTypeAndAuditStatusAndServantId(String type, String auditStatus, Integer servantId);
	
	Page<ConsumeReport> findConsumeReport(ConsumeReport report, Pageable pageable);

	List<Customer> findCustomerList(String type);
	
	List<Customer> findCustomerList(String type,String auditStatus);
	
	List<Customer> findCustomerList(String type,int servantId);
	
	Integer countCustomer(Integer distributorId);
	
	List<StarReport> findLevelCount();
	
	Page<Customer> findDAll(Customer customer, Pageable pageable);
}
